﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Engine.POI
{
    public class Location
    {
        float x; //latitude
        float y;//longitude
        
        int degrees;
        float minutes;
        float seconds;

        #region Properties

        /// <summary>
        /// Latitude
        /// </summary>
        public float X
        {
            get { return x; }
            set { x = value; }
        }

        /// <summary>
        /// Longitude
        /// </summary>
        public float Y
        {
            get { return y; }
            set { y = value; }
        }

        #endregion


        #region Constructors

        /// <summary>
        /// Default constructor
        /// </summary>
        public Location()
        {
            x = 0;
            y = 0;
            degrees = 0;
            minutes = 0;
            seconds = 0;
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="Lat">Latitude value</param>
        /// <param name="Long">Longitude value</param>
        public Location(float Lat, float Long)
            :this()
        {            
            x = Lat;
            y = Long;
        }


        /// <summary>
        /// 
        /// </summary>
        /// <param name="Degrees"></param>
        /// <param name="Minutes"></param>
        public Location(int Degrees, float Minutes)
            : this()
        {
            degrees = Degrees;
            minutes = Minutes;
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="Degrees"></param>
        /// <param name="Minutes"></param>
        /// <param name="Seconds"></param>
        public Location(int Degrees, float Minutes, float Seconds)
            : this(Degrees,Minutes)
        {
            seconds = Seconds;            
        }



        #endregion


        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        public override string ToString()
        {
            return string.Format("{0} , {1}", x, y);
        }
    }
}
